home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_kdelibs.idb / usr / freeware / kde / include / kcombiview.h.z / kcombiview.h
Encoding:
C/C++ Source or Header  |  1999-01-26  |  2.2 KB  |  70 lines

  1. /* This file is part of the KDE libraries
  2.     Copyright (C) 1998 Stephan Kulow <coolo@kde.org>
  3.                   1998 Daniel Grana <grana@ie.iwi.unibe.ch>
  4.       
  5.     This library is free software; you can redistribute it and/or
  6.     modify it under the terms of the GNU Library General Public
  7.     License as published by the Free Software Foundation; either
  8.     version 2 of the License, or (at your option) any later version.
  9.  
  10.     This library is distributed in the hope that it will be useful,
  11.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  12.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  13.     Library General Public License for more details.
  14.  
  15.     You should have received a copy of the GNU Library General Public License
  16.     along with this library; see the file COPYING.LIB.  If not, write to
  17.     the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  18.     Boston, MA 02111-1307, USA.
  19. */
  20.  
  21. #ifndef _KCOMBIVIEW_H
  22. #define _KCOMBIVIEW_H
  23.  
  24. #include "kfileinfocontents.h"
  25. #include "knewpanner.h"
  26.  
  27. class KCombiView: protected KNewPanner, public KFileInfoContents
  28. {
  29.     Q_OBJECT
  30.     
  31. public:
  32.     typedef enum { SimpleView, DetailView, DirList, Custom } FileView;
  33.  
  34.     KCombiView( FileView dirs, FileView files, 
  35.                 bool s, QDir::SortSpec sorting,
  36.         QWidget * parent=0, const char * name=0 );
  37.     ~KCombiView();
  38.     
  39.     virtual QWidget *widget() { return this; }
  40.     virtual void setAutoUpdate(bool);
  41.     virtual void setCurrentItem(const char *filename, const KFileInfo *i);
  42.     virtual void repaint(bool f = true);
  43.  
  44.     virtual QString findCompletion( const char *base, bool activateFound );
  45.  
  46.     virtual bool acceptsFiles() { return true; }
  47.     virtual bool acceptsDirs() { return true; }
  48.  
  49. protected slots:
  50.     
  51.     void dirActivated(KFileInfo*);
  52.     void fileActivated(KFileInfo*);
  53.     void fileHighlighted(KFileInfo*);
  54.  
  55. protected:
  56.     
  57.     virtual KFileInfoContents *getDirList() { return 0; }
  58.     virtual KFileInfoContents *getFileList() { return 0; }
  59.  
  60.     virtual void highlightItem(unsigned int item);
  61.     virtual void clearView();
  62.     virtual bool insertItem(const KFileInfo *i, int index);
  63.     
  64. private:
  65.     KFileInfoContents *dirList;
  66.     KFileInfoContents *fileList;
  67. };
  68.  
  69. #endif
  70.